
<div xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:a="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:ctg="http://www.crotouristguide.com/taglib">
	<h:form>
		<rich:panel styleClass="blue-panel">
			<ctg:status />
			<s:decorate id="wizar" template="/templates/wizard.xhtml">
				<ui:define name="step-title">#{messages['label.suggest.step.title.8']}</ui:define>
				<ui:define name="step-tip">#{messages['label.suggest.step.tip.8']}</ui:define>
				<ui:define name="step-form">
					<s:decorate id="jezikDecoration"
							template="/templates/edit.xhtml">
							<ui:define name="label">#{messages['label.language']}</ui:define>
							<h:selectOneMenu id="jezik"
								styleClass="field" value="#{objektSuggest.opisObjekta.jezik}" required="true">
								<s:selectItems id="jezici"
									value="#{objektSuggest.jezici}" var="j"
									label="#{messages[stringUtil.merge('label.jezik.',j.idJezika)]}"
									noSelectionLabel="#{messages['label.suggest.selectvalue']}" />
								<s:convertEntity />
							</h:selectOneMenu>
						</s:decorate>
						<s:decorate id="opisObjektaDecoration"
							template="/templates/edit.xhtml">
							<ui:define name="label">#{messages['label.desc']}</ui:define>
							<h:inputTextarea id="opisObjekta" 
								styleClass="text" value="#{objektSuggest.opisObjekta.opis}"/>
							<ui:define name="tip">
								#{messages['label.suggest.step.tip.objekt.description']}
							</ui:define>
						</s:decorate>
					<a:commandButton styleClass="submit" value="#{messages['label.input.button.add.desc']}" action="#{objektSuggest.dodajOpis}" reRender="wizardpanel,jezikDecoration,opisObjektaDecoration,edataXXX"/>
				</ui:define>
				<ui:define name="buttn-cancel">
					<h:commandButton styleClass="submit"
							value="#{messages['label.objekt.input.button.update']}"
							action="#{objektSuggest.zapisiObjekt}" rendered="#{objektSuggest.editMode}" immediate="true"/>
						<ctg:nbsp/>		
					<a:commandButton value="#{messages['label.input.cancel']}" action="end" immediate="true"/>
				</ui:define>
				<ui:define name="buttn-prev">
					<a:commandButton value="#{messages['label.input.back']}" action="#{objektSuggest.previousStep}" reRender="wizardpanel" immediate="true"/>
				</ui:define>
				<ui:define name="buttn-next">		
					<a:commandButton value="#{messages['label.input.next']}" action="#{objektSuggest.nextStep}" reRender="wizardpanel" immediate="true"/>
				</ui:define>
				<ui:define name="step-entered-data">
					<s:decorate id="edataXXX">
						<h:dataTable value="#{objektSuggest.uneseniOpisi}" var="uo" rendered="#{! empty objektSuggest.uneseniOpisi}" rowClasses="rowOdd,rowEven">
							<f:facet name="header">#{messages['label.desc.list.title']}</f:facet>
							<h:column>
								<f:facet name="header">#{messages['label.desc']}</f:facet>
								<h:outputText value="#{uo.opis}"/>
							</h:column>
							<h:column>
								<f:facet name="header">#{messages['label.language']}</f:facet>
								<h:outputText value="#{messages[stringUtil.merge('label.jezik.',uo.jezik.idJezika)]}"/>
							</h:column>
							<h:column>
								<f:facet name="header">Akcije</f:facet>
								<a:commandLink styleClass="submit"
									value="#{messages['label.button.remove']}"
									action="#{objektSuggest.ukloniOpis(uo)}" reRender="wizardpanel, jezikDecoration" immediate="true"/>
							</h:column>
						</h:dataTable>
					</s:decorate>
				</ui:define>
			</s:decorate>
		</rich:panel>

	</h:form>

</div>